package pod

import (
	"gitee/yinlai/kms-backend/controllers/pod"
	"github.com/gin-gonic/gin"
)

// 实现添加集群
func create(podGroup *gin.RouterGroup) {
	podGroup.POST("/create", pod.Create)
}

// 更新集群
func update(podGroup *gin.RouterGroup) {
	podGroup.POST("/update", pod.Update)
}

// 删除
func delete(podGroup *gin.RouterGroup) {
	podGroup.POST("/delete", pod.Delete)
}

// 删除列表
func deleteList(podGroup *gin.RouterGroup) {
	podGroup.POST("/deleteList", pod.DeleteList)
}

// 获取
func get(podGroup *gin.RouterGroup) {
	podGroup.GET("/get", pod.Get)
}

// 获取集群列表
func list(podGroup *gin.RouterGroup) {
	podGroup.GET("/list", pod.List)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	podGroup := g.Group("/pod")
	create(podGroup)
	update(podGroup)
	delete(podGroup)
	get(podGroup)
	list(podGroup)
	deleteList(podGroup)
}
